package com.itlong.cloud.operate.service;

import com.itlong.cloud.POJO.DTO.operate.OperateDeviceWhiteListAuthRulesDTO;
import com.itlong.cloud.POJO.VO.operate.OperateDeviceWhiteListAuthRulesVO;
import com.itlong.cloud.utils.page.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      运营-设备白名单授权文件规则管理服务接口
 * </desc>
 *
 * @createDate  2020/08/11
 */
public interface IOperateDeviceWhiteListAuthRulesService {

    /**
     * <desc>
     *      分页获取设备白名单授权文件规则信息
     * </desc>
     *
     * @param dto 设备白名单DTO
     * @return
     * @Author Juguang.S
     * @createDate  2020/08/11
     */
    Page<OperateDeviceWhiteListAuthRulesVO> getWhiteListAuthRulesByPage(OperateDeviceWhiteListAuthRulesDTO dto) throws Exception;

    /**
     * <desc>
     *      保存设备白名单授权文件规则信息
     * </desc>
     *
     * @param dto 设备白名单授权文件规则DTO
     * @return
     * @Author Juguang.S
     * @createDate  2020/08/11
     */
    void save(OperateDeviceWhiteListAuthRulesDTO dto) throws Exception;

    /**
     * <desc>
     *      禁用启用设备白名单授权文件规则
     * </desc>
     *
     * @param dto 参数DTO
     * @return
     * @Author Juguang.S
     * @createDate  2020/08/11
     */
    void forbidden(OperateDeviceWhiteListAuthRulesDTO dto) throws Exception;

    /**
     *<desc>
     * 根据授权规则id更新授权可用次数
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-08-16 9:31
     * @Param  usedTimes 可用次数  ruleId规则id
     * @Return
     * @Exception
     *
     */
    int updateWhiteListAuthRulesByRuleId(OperateDeviceWhiteListAuthRulesDTO dto) throws Exception;

    /**
     *<desc>
     * 根据输入的密码获取设备白名单授权文件规则信息集合
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-08-20 9:18
     * @Param  OperateDeviceWhiteListAuthRulesDTO 查询参数
     * @Return
     * @Exception
     *
     */
    List<OperateDeviceWhiteListAuthRulesVO> getWhiteListAuthRulesByList(OperateDeviceWhiteListAuthRulesDTO dto) throws Exception;

    /**
     * <desc>
     *      校验同一时间内的密码不能重复
     * </desc>
     *
     * @param dto 设备白名单授权文件规则DTO
     * @return
     * @Author Juguang.S
     * @createDate  2020/08/20
     */
    Integer checkPassword(OperateDeviceWhiteListAuthRulesDTO dto) throws Exception;

}
